Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

PURGE(add(N, X)) → RM(N, X)
PURGE(add(N, X)) → PURGE(rm(N, X))
EQ(s(X), s(Y)) → EQ(X, Y)
IFRM(true, N, add(M, X)) → RM(N, X)
IFRM(false, N, add(M, X)) → RM(N, X)
RM(N, add(M, X)) → EQ(N, M)
RM(N, add(M, X)) → IFRM(eq(N, M), N, add(M, X))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

PURGE(add(N, X)) → RM(N, X)
PURGE(add(N, X)) → PURGE(rm(N, X))
EQ(s(X), s(Y)) → EQ(X, Y)
IFRM(true, N, add(M, X)) → RM(N, X)
IFRM(false, N, add(M, X)) → RM(N, X)
RM(N, add(M, X)) → EQ(N, M)
RM(N, add(M, X)) → IFRM(eq(N, M), N, add(M, X))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

PURGE(add(N, X)) → PURGE(rm(N, X))
PURGE(add(N, X)) → RM(N, X)
EQ(s(X), s(Y)) → EQ(X, Y)
IFRM(true, N, add(M, X)) → RM(N, X)
IFRM(false, N, add(M, X)) → RM(N, X)
RM(N, add(M, X)) → EQ(N, M)
RM(N, add(M, X)) → IFRM(eq(N, M), N, add(M, X))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 3 SCCs with 2 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ(s(X), s(Y)) → EQ(X, Y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


EQ(s(X), s(Y)) → EQ(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
EQ(x1, x2)  =  EQ(x1)
s(x1)  =  s(x1)

Lexicographic path order with status [19].
Precedence:
s1 > EQ1

Status:
EQ1: [1]
s1: multiset

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IFRM(true, N, add(M, X)) → RM(N, X)
IFRM(false, N, add(M, X)) → RM(N, X)
RM(N, add(M, X)) → IFRM(eq(N, M), N, add(M, X))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


IFRM(true, N, add(M, X)) → RM(N, X)
IFRM(false, N, add(M, X)) → RM(N, X)
The remaining pairs can at least be oriented weakly.

RM(N, add(M, X)) → IFRM(eq(N, M), N, add(M, X))
Used ordering: Combined order from the following AFS and order.
IFRM(x1, x2, x3)  =  x3
true  =  true
add(x1, x2)  =  add(x2)
RM(x1, x2)  =  x2
false  =  false
eq(x1, x2)  =  eq(x1)
s(x1)  =  s
0  =  0

Lexicographic path order with status [19].
Precedence:
add1 > eq1 > true > false
s > false
0 > true > false

Status:
true: multiset
false: multiset
eq1: [1]
0: multiset
s: multiset
add1: multiset

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

RM(N, add(M, X)) → IFRM(eq(N, M), N, add(M, X))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

PURGE(add(N, X)) → PURGE(rm(N, X))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


PURGE(add(N, X)) → PURGE(rm(N, X))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
PURGE(x1)  =  PURGE(x1)
add(x1, x2)  =  add(x2)
rm(x1, x2)  =  x2
nil  =  nil
eq(x1, x2)  =  eq
s(x1)  =  s
0  =  0
false  =  false
true  =  true
ifrm(x1, x2, x3)  =  x3

Lexicographic path order with status [19].
Precedence:
add1 > PURGE1 > false
nil > false
eq > true > false
s > false
0 > false

Status:
true: multiset
false: multiset
eq: []
0: multiset
s: multiset
PURGE1: [1]
nil: multiset
add1: [1]

The following usable rules [14] were oriented:

rm(N, nil) → nil
ifrm(true, N, add(M, X)) → rm(N, X)
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(false, N, add(M, X)) → add(M, rm(N, X))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(X)) → false
eq(s(X), 0) → false
eq(s(X), s(Y)) → eq(X, Y)
rm(N, nil) → nil
rm(N, add(M, X)) → ifrm(eq(N, M), N, add(M, X))
ifrm(true, N, add(M, X)) → rm(N, X)
ifrm(false, N, add(M, X)) → add(M, rm(N, X))
purge(nil) → nil
purge(add(N, X)) → add(N, purge(rm(N, X)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
rm(x0, nil)
rm(x0, add(x1, x2))
ifrm(true, x0, add(x1, x2))
ifrm(false, x0, add(x1, x2))
purge(nil)
purge(add(x0, x1))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.